<div ng-controller="${tableName}FormCtrl">
    <section class="content-header">
        <h1>
            {{title}}
            <small>Version 1.0</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="javascript:;"><i class="fa fa-dashboard"></i>XXXXXX</a></li>
            <li class="active">XXXXXX</li>
        </ol>
    </section>

    <form class="form-horizontal" name="form" role="form" novalidate>

        <section class="content">
            <div class="row">
                <div class="col-lg-12 col-sm-12">
                    <div class="box">
                        <div class="box-header"></div>
                        <div class="box-body">

                            <div class="alert alert-danger alert-dismissable" ng-show="errorMessage">
                                <button type="button" class="close" ng-click="clearErrorMessage();">×</button>
                                <h4><i class="icon fa fa-ban"></i>{{errorMessage}}</h4>
                            </div>

                            <div class="alert alert-success alert-dismissable cssSlideUp" ng-show="successMessage">
                                <button type="button" class="close" ng-click="clearSuccessMessage();">×</button>
                                <h4><i class="icon fa fa-ban"></i>{{successMessage}}</h4>
                            </div>


                        <#list fields as field>
                            <#if field.colName != "updateTime" && !field.autoIncrement>
                                <#if (field_index % 2) gt 0>
                                <div class="form-group">
                                </#if>
                                <div class="col-lg-6 col-md-6">
                                    <label class="control-label col-lg-3 col-sm-4">${field.colName}</label>

                                    <div class="col-lg-6 col-sm-8">
                                        <input type="text" class="form-control"
                                               ng-model="${tableName}.${field.colName}"/>
                                    </div>
                                </div>
                                <#if (field_index % 2) == 0 && field_index != 0 || !field_has_next>
                                </div>
                                </#if>
                            </#if>
                        </#list>
                            <div class=" col-lg-offset-5 col-sm-offset-5">
                                <button class="btn btn-primary" ng-click="save();" ng-disabled="form.$invalid">保存
                                </button>
                                <button class="btn btn-default" ui-sref="index.${tableName}Mng">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </form>
</div>